home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume24 / newsgate / part04 < prev    next >
Encoding:
Internet Message Format  |  1991-10-09  |  19.2 KB

  1. Subject:  v24i054:  News/mail gateway package, Part04/04
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: e2e8a662 48e21fe4 3f9a1a28 b038ddc6
  5.  
  6. Submitted-by: Rich $alz <rsalz@bbn.com>
  7. Posting-number: Volume 24, Issue 54
  8. Archive-name: newsgate/part04
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # Contents:  Makefile TODO mkmailpost.1 news2mail.sh patchlevel.h
  17. #   signoff.1 str.c test-addr test-gag
  18. # Wrapped by rsalz@litchi.bbn.com on Fri Mar 15 16:42:28 1991
  19. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  20. echo If this archive is complete, you will see the following message:
  21. echo '          "shar: End of archive 4 (of 4)."'
  22. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'Makefile'\"
  24. else
  25.   echo shar: Extracting \"'Makefile'\" \(2636 characters\)
  26.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  27. X##
  28. X##  Makefile for mail/news gateway programs.
  29. X##  $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/Makefile,v 1.10 91/02/12 15:10:43 rsalz Exp $
  30. X##
  31. XSHELL    = /bin/sh
  32. X
  33. X##  Edit appropriately.  See gate.h before you touch UUCP_INET.
  34. X2_11        = /nfs/papaya/source/news2.11/src
  35. XUUCP_INET    = /usr/lib/news/.admin/uucp-2-inet
  36. XDESTDIR        = /usr/uucp/bin
  37. XOPT        = -g
  38. X#OPT        = -O
  39. XDEFS        =
  40. XCFLAGS        = $(OPT) $(DEFS)
  41. XLINKFLAGS    =
  42. X#LINKFLAGS    = -s -Bstatic
  43. X
  44. XTARFILE        = newsgate.tar.Z
  45. X
  46. X##  News files, copied over from $(2_11).
  47. XGETDATE    = getdate.o
  48. X
  49. X##  Gag, the gateway alias generator.
  50. XG_SRCS    = gag.c lex.c misc.c
  51. XG_OBJS    = gag.o lex.o misc.o
  52. X
  53. X##  Mail2News, the mail into news part of the gateway.
  54. XM_SRCS    = misc.c regex.c str.c hdr.c mail2news.c rfc822.c
  55. XM_OBJS    = misc.o regex.o str.o hdr.o mail2news.o rfc822.o $(GETDATE)
  56. X
  57. X##  News2Mail, the news into mail part of the gateway.
  58. XN_SRCS    = misc.c news2mail.c
  59. XN_OBJS    = misc.o news2mail.o
  60. X
  61. X##  Manpages for the programs.
  62. XDOCS    = gag.1 mail2news.1 mkmailpost.1 news2mail.1 signoff.1
  63. X
  64. Xall:            mail2news news2mail gag mkmailpost tags lint
  65. X
  66. Xinstall:        all
  67. X    @echo "Install as directed in the README file."
  68. X#    @rm -f $(DESTDIR)/gag $(DESTDIR)/mail2news $(DESTDIR)/news2mail
  69. X#    cp gag mail2news news2mail $(DESTDIR)/.
  70. X#    cp uucp-2-inet $(UUCP_INET)
  71. X
  72. Xclean:
  73. X    rm -f mail2news news2mail gag mkmailpost *.o
  74. X    rm -f tags lint.? core gag.c gag.h lex.c
  75. X    rm -f Part0? $(TARFILE)
  76. X
  77. Xtags:            $(N_SRCS) $(M_SRCS)
  78. X    ctags -tw $(N_SRCS) $(M_SRCS) $(G_SRCS) gate.h
  79. X
  80. Xlint:            lint.d lint.g lint.m lint.n
  81. X
  82. X
  83. X##
  84. Xmail2news:        $(M_OBJS)
  85. X    @rm -f mail2news
  86. X    $(CC) $(CFLAGS) $(LINKFLAGS) -o mail2news $(M_OBJS)
  87. X
  88. Xnews2mail:        $(N_OBJS)
  89. X    @rm -f news2mail
  90. X    $(CC) $(CFLAGS) $(LINKFLAGS) -o news2mail $(N_OBJS)
  91. X
  92. Xgag:            $(G_OBJS)
  93. X    @rm -f gag
  94. X    $(CC) $(CFLAGS) $(LINKFLAGS) -o gag $(G_OBJS)
  95. X
  96. Xmkmailpost:        mkmailpost.sh
  97. X    @rm -f mkmailpost
  98. X    cp mkmailpost.sh mkmailpost
  99. X    chmod 755 mkmailpost
  100. X
  101. X##
  102. X$(G_OBJS) $(M_OBJS) $(N_OBJS):    gate.h
  103. X
  104. X
  105. X##
  106. Xlint.d:            $(DOCS)
  107. X    checknr -c.IR.BI.RI $(DOCS) regex.3 >lint.d
  108. Xlint.g:            gag
  109. X    lint -a    -h $(DEFS) $(G_SRCS) |grep -v yaccpar >lint.g
  110. Xlint.m:            mail2news
  111. X    lint -a -b -h $(DEFS) $(M_SRCS) >lint.m
  112. Xlint.n:            news2mail
  113. X    lint -a -b -h $(DEFS) $(N_SRCS) >lint.n
  114. X
  115. X
  116. X##  Keep intermediate files around.
  117. Xlex.o:            lex.c
  118. Xgag.o:            gag.c
  119. Xgag.c:            gag.y
  120. X    @rm -f gag.c gag.h
  121. X    yacc -d gag.y
  122. X    @mv y.tab.c gag.c
  123. X    @mv y.tab.h gag.h
  124. X
  125. X
  126. X##
  127. Xshar:
  128. X    @rm -f Part0?
  129. X    makekit -m
  130. X    @rm -f MANIFEST.BAK
  131. X    @-chmod 444 Part0?
  132. Xtar:
  133. X    @rm -f $(TARFILE)
  134. X    tar cf newsgate.tar `awk 'NR > 2 { print $$1; }' <MANIFEST`
  135. X    compress newsgate.tar
  136. X
  137. X
  138. X##  Get the date parser from 2.11 news.
  139. X$(GETDATE):
  140. X    @rm -f $(GETDATE)
  141. X    cd $(2_11) ; make $(GETDATE)
  142. X    cp $(2_11)/$(GETDATE) .
  143. END_OF_FILE
  144.   if test 2636 -ne `wc -c <'Makefile'`; then
  145.     echo shar: \"'Makefile'\" unpacked with wrong size!
  146.   fi
  147.   # end of 'Makefile'
  148. fi
  149. if test -f 'TODO' -a "${1}" != "-c" ; then 
  150.   echo shar: Will not clobber existing file \"'TODO'\"
  151. else
  152.   echo shar: Extracting \"'TODO'\" \(723 characters\)
  153.   sed "s/^X//" >'TODO' <<'END_OF_FILE'
  154. X
  155. XA news2mail option that specifies an Errors-To header.
  156. XA mail2news option that specifies where errors get mailed to.
  157. XA news2mail option that specifies a Sender header.
  158. X
  159. XFrom tower@bu-it.BU.EDU
  160. XFrom looking!brad
  161. XFrom isaak!woerz
  162. XFrom ateng!chip
  163. XFrom auspex!guy
  164. XSummary: Generate References: line from
  165. X    - indentical Subject line texts (less any 'Re: 's)
  166. X      (Involves keeping a database of current subject lines; use iff
  167. X       In-Relpy-To is missing subject starts with Re:)
  168. X    - Message-ID's (where present) in In-Reply-To: kines
  169. X    - Other information in In-Reply-To: lines.
  170. X
  171. XProblems -- Berkeley Mail doesn't generate them, do other UA's?
  172. X    They don't always contain the Message-ID of the message to
  173. X    which the user is replying.
  174. END_OF_FILE
  175.   if test 723 -ne `wc -c <'TODO'`; then
  176.     echo shar: \"'TODO'\" unpacked with wrong size!
  177.   fi
  178.   # end of 'TODO'
  179. fi
  180. if test -f 'mkmailpost.1' -a "${1}" != "-c" ; then 
  181.   echo shar: Will not clobber existing file \"'mkmailpost.1'\"
  182. else
  183.   echo shar: Extracting \"'mkmailpost.1'\" \(2475 characters\)
  184.   sed "s/^X//" >'mkmailpost.1' <<'END_OF_FILE'
  185. X.\" $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/mkmailpost.1,v 1.5 91/02/12 14:49:13 rsalz Exp $
  186. X.TH MKMAILPOST 1 LOCAL
  187. X.SH NAME
  188. Xmkmailpost \- make a set of mailpost commands for a gag file
  189. X.SH SYNOPSIS
  190. X.B mkmailpost
  191. X[
  192. X.B activefile
  193. X[
  194. X.B mail2news_path
  195. X] ]
  196. X.SH DESCRIPTION
  197. X.I mkmailpost
  198. Xreads the news active file and generates a a set of ``mailpost'' commands
  199. Xfor feeding into
  200. X.IR gag (1L).
  201. XOutput is sent to the standard output.
  202. X.PP
  203. XThe first argument is the path to the news active file; the default is
  204. X.IR /usr/lib/news .
  205. XThe second argument is the path to the
  206. X.I mail2news
  207. Xprogram; if specified, then a ``default mail2news
  208. X.IR path ''
  209. Xis output.
  210. X.PP
  211. X.I Mkmailpost
  212. Xignores moderated groups, as well as ``junk,'' ``general,'' and those
  213. Xof the form
  214. X.RI ``to. site .''
  215. XIt also ignores groups with the word ``test'' in them; such groups usually
  216. Xhave mail reflectors attached to them, so that the poster gets a copy of
  217. Xtheir message.
  218. XIt is assumed that this is not appropriate if someone is mailing into a site.
  219. X.I Mkmailpost
  220. Xalso ignores groups with with the words ``announce'' in them under the
  221. Xassumption that they are moderated groups and mail should be sent to
  222. Xthe moderator, instead.
  223. X(It is agreed that finding the moderator for non-Usenet sites can be
  224. Xproblematic.)
  225. X.PP
  226. XAssume the main
  227. X.I gag
  228. Xinput is named
  229. X.IR main.gag .
  230. XThe following command line can be useful:
  231. X.RS
  232. X.nf
  233. X( echo '#include "main.gag"' ; mkmailpost ) \e
  234. X    | /lib/cpp | gag
  235. X.fi
  236. X.RE
  237. X(On some systems you may have to use ``cc \-E'' or ``cc \-P'' instead
  238. Xof ``/lib/cpp.'')
  239. X.SH BUGS
  240. XSince the name and number of Usenet groups changes very frequently,
  241. Xa better method is to define a more general way of feeding mail into
  242. Xnewsgroups.
  243. XFor example, with
  244. X.IR sendmail (8),
  245. Xit is possible to define a class for all top-level groups (this changes
  246. Xmuch less frequently), and define a ``news'' mailer to receive mail
  247. Xsent to such addresses.
  248. XIf the following class is defined:
  249. X.RS
  250. X.nf
  251. XCNcomp misc news rec sci soc talk alt
  252. XCNunix\-pc ddn gnu u3b pubnet
  253. X.fi
  254. X.RE
  255. Xthen these lines can be added to the ``mailer resolver'' part of ruleset zero:
  256. X.RS
  257. XR$=N.$*   $#news$:$1.$2   Posting to news
  258. X.RE
  259. Xwith the following mailer defined:
  260. X.RS
  261. X.nf
  262. X.ta \w'Mnews,  'u
  263. XMnews,    P=/usr/lib/news/mail2news,
  264. X    F=DFMls, M=131071, A=mail2news -n $u
  265. X.fi
  266. X.RE
  267. XThis idea comes from Karl Kleinpaste <karl@cis.ohio-state.edu>.
  268. X.SH "SEE ALSO"
  269. Xgag(1L).
  270. X.SH AUTHOR
  271. XRich $alz <rsalz@bbn.com>, after an idea by
  272. X.br
  273. XErik E. Fair <fair@apple.com>.
  274. END_OF_FILE
  275.   if test 2475 -ne `wc -c <'mkmailpost.1'`; then
  276.     echo shar: \"'mkmailpost.1'\" unpacked with wrong size!
  277.   fi
  278.   # end of 'mkmailpost.1'
  279. fi
  280. if test -f 'news2mail.sh' -a "${1}" != "-c" ; then 
  281.   echo shar: Will not clobber existing file \"'news2mail.sh'\"
  282. else
  283.   echo shar: Extracting \"'news2mail.sh'\" \(2032 characters\)
  284.   sed "s/^X//" >'news2mail.sh' <<'END_OF_FILE'
  285. X#! /bin/sh
  286. X##  $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/news2mail.sh,v 1.3 91/02/12 14:50:28 rsalz Exp $
  287. X##  A short, mostly-awk, script to send news on stdin out as mail.
  288. X##  Usage:  news2mail <address>
  289. X##  Written by John S. Quarterman <jsq@longway.tic.com>.
  290. X##  Light editing by Rich $alz <rsalz@bbn.com>.
  291. XPATH=/usr/local:/usr/ucb:/bin:/usr/bin ; export PATH
  292. X
  293. Xcase $1 in
  294. X"")
  295. X    echo "Usage:  `basename $0` address"
  296. X    exit 1
  297. X    ;;
  298. X"-")
  299. X    TO="cat -u"
  300. X    ;;
  301. X*)
  302. X    TO="/bin/mail $1"
  303. X    ;;
  304. Xesac
  305. X
  306. Xawk '
  307. XBEGIN {
  308. X    header = 1;
  309. X    date = "";
  310. X}
  311. Xheader == 1 && /^$/ {
  312. X    # End of headers; print dates.
  313. X    header = 0;
  314. X    if (pdate != "" && date ~ /GMT/ && pdate !~ /GMT/) {
  315. X    print "Date: "pdate;
  316. X    print "Posted-Date: "date;
  317. X    } else {
  318. X    if (date != "")
  319. X        print "Date: "date;
  320. X    if (pdate != "")
  321. X        print "Posted-Date: "pdate;
  322. X    }
  323. X}
  324. Xheader == 0 {
  325. X    print $0;
  326. X    next;
  327. X}
  328. X$1 == "Relay-Version:"        { next; }
  329. X$1 == "Posting-Version:"    { next; }
  330. X$1 == "Path:"            { next; }
  331. X$1 == "From"            { next; }
  332. X$1 == "Date-Received:"        { next; }
  333. X$1 == "Received-Date:"        { next; }
  334. X#$1 == "Newsgroups:"        { next; }
  335. X#$1 == "Organization:"        { next; }
  336. X$1 == "Approved:"        { next; }
  337. X$1 == "Lines:"            { next; }
  338. X$1 == "Date:" {
  339. X    date = $2;
  340. X    for (i = 3; i <= NF; i++)
  341. X    date = date " " $i;
  342. X    next;
  343. X}
  344. X$1 == "Posted-Date:" {
  345. X    pdate = $2;
  346. X    for (i = 3; i <= NF; i++)
  347. X    pdate = pdate " " $i;
  348. X    next;
  349. X}
  350. X$1 == "From:" {
  351. X    address=$2;
  352. X    name = "";
  353. X    surround = 0;
  354. X    for (f = 3; f <= NF; f++) {
  355. X    if ($f ~ /,/)
  356. X        surround=1;
  357. X    if (split ($f, parts, "(") > 1)
  358. X        it = parts[2];
  359. X    else
  360. X        it = $f;
  361. X    if (split ($f, parts, ")") > 1)
  362. X        it = parts[1];
  363. X    if (name == "")
  364. X        name = it;
  365. X    else
  366. X        name = name " " it;
  367. X    }
  368. X    if (address ~ /.UUCP$/) {
  369. X    split(address, parts, "@");
  370. X    address = sprintf ("%s%%%s@%s", parts[1], parts[2], "'`hostname`'");
  371. X    }
  372. X    if (surround != 0)
  373. X        printf ("From: %s (%s)\n", address, name);
  374. X    else
  375. X        printf ("From: %s <%s>\n", name, address);
  376. X    next;
  377. X}
  378. X{
  379. X    print $0;
  380. X}' | eval $TO
  381. END_OF_FILE
  382.   if test 2032 -ne `wc -c <'news2mail.sh'`; then
  383.     echo shar: \"'news2mail.sh'\" unpacked with wrong size!
  384.   fi
  385.   chmod +x 'news2mail.sh'
  386.   # end of 'news2mail.sh'
  387. fi
  388. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  389.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  390. else
  391.   echo shar: Extracting \"'patchlevel.h'\" \(478 characters\)
  392.   sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  393. X/*
  394. X**  HEADER FILE FOR NEWS/MAIL GATEWAY CODE.
  395. X**  $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/patchlevel.h,v 1.2 91/02/12 15:02:40 rsalz Exp $
  396. X**
  397. X**  $Log:    patchlevel.h,v $
  398. X**  Revision 1.2  91/02/12  15:02:40  rsalz
  399. X**  Incorporate all known major code fixes.
  400. X**  For release to NNTP-MANAGERS, prior to posting.
  401. X**  I hope next release will be 2.0, reasonable patches.
  402. X**  
  403. X**  Revision 1.1  89/07/10  13:04:23  rsalz
  404. X**  Initial revision
  405. X**  
  406. X*/
  407. X#define PATCHLEVEL    10
  408. END_OF_FILE
  409.   if test 478 -ne `wc -c <'patchlevel.h'`; then
  410.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  411.   fi
  412.   # end of 'patchlevel.h'
  413. fi
  414. if test -f 'signoff.1' -a "${1}" != "-c" ; then 
  415.   echo shar: Will not clobber existing file \"'signoff.1'\"
  416. else
  417.   echo shar: Extracting \"'signoff.1'\" \(2210 characters\)
  418.   sed "s/^X//" >'signoff.1' <<'END_OF_FILE'
  419. X.\" $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/signoff.1,v 1.3 91/02/12 14:54:40 rsalz Exp $
  420. X.TH SIGNOFF 1 LOCAL
  421. X.SH NAME
  422. Xsignoff \- See if a message is a subscription request
  423. X.SH SYNOPSIS
  424. X.B signoff
  425. X[
  426. X.I message_file
  427. X]
  428. X.SH DESCRIPTION
  429. X.PP
  430. X.I Signoff
  431. Xis a small hack used to see if a mail message is one of those annoying
  432. X\&``please add me'' or ``please drop me from your list'' messages.
  433. XSuch messages should be sent to a list maintainer, but often people
  434. Xmake mistakes and send them to the entire list.
  435. XThis behavior is particularly impolite when a message is gatewayed into
  436. Xa Usenet newsgroup.
  437. X.PP
  438. XWhen invoked as a front-end to
  439. X.IR mail2news ,
  440. X.I signoff
  441. Xdoes a pretty good job of trapping such messages before they get posted.
  442. X.I Signoff
  443. Xreads the message from the file named in its first argument, or from
  444. Xstandard input if no arguments are given.
  445. XIt exits with a successful (zero) status if the message is a normal one,
  446. Xor does an ``exit(1)'' if the message is a subscription request.
  447. XFor example, here is a script that could be used as a wrapper around the
  448. X.I news2mail
  449. Xprogram:
  450. X.RS
  451. X.nf
  452. X#! /bin/sh
  453. Xcat >/tmp/signoff$$
  454. Xif /usr/lib/news/signoff </tmp/signoff$$ ; then
  455. X    /usr/ucb/Mail -s "Rejected subscription request" news </tmp/signoff$$
  456. Xelse
  457. X    /usr/lib/news/mail2news.real </tmp/signoff$$
  458. Xfi
  459. Xexec rm /tmp/signoff$$
  460. X.fi
  461. X.RE
  462. X.PP
  463. XNote that
  464. X.I signoff
  465. Xis already incorporated into
  466. X.IR mail2news ;
  467. Xsee the ``\-F'' option.
  468. XIt is provided here as a separate program for more conservative use.
  469. X(The ``\-F'' doesn't send rejected messages to the news account for
  470. Xverification.)
  471. XAlso, with the following line in your news sys file:
  472. X.RS
  473. X.nf
  474. Xsignoff:all::/usr/lib/news/test_signoff
  475. X.fi
  476. X.RE
  477. Xand the following script:
  478. X.RS
  479. X.nf
  480. X#! /bin/sh
  481. Xcat >/tmp/ts$$
  482. X/usr/lib/news/signoff </tmp/ts$$ || Mail -s "Signoff found" news </tmp/ts$$
  483. Xexec rm /tmp/ts$$
  484. X.fi
  485. X.RE
  486. Xit is possible to test the ``algorithm'' used by
  487. X.IR signoff .
  488. X.SH BUGS
  489. XPerhaps a better way to test is to make the test less conservative,
  490. Xand see what valid articles get caught, and make adjustments then?
  491. XComments on the program are solicited.
  492. X.SH AUTHORS
  493. XRich $alz <rsalz@bbn.com>, after a program by
  494. X.br
  495. XRuss Nelson <nelson@clutx.clarkson.edu>.
  496. END_OF_FILE
  497.   if test 2210 -ne `wc -c <'signoff.1'`; then
  498.     echo shar: \"'signoff.1'\" unpacked with wrong size!
  499.   fi
  500.   # end of 'signoff.1'
  501. fi
  502. if test -f 'str.c' -a "${1}" != "-c" ; then 
  503.   echo shar: Will not clobber existing file \"'str.c'\"
  504. else
  505.   echo shar: Extracting \"'str.c'\" \(612 characters\)
  506.   sed "s/^X//" >'str.c' <<'END_OF_FILE'
  507. X/*
  508. X**  String-related routines for mail2news.
  509. X*/
  510. X#include "gate.h"
  511. X#ifdef    RCSID
  512. Xstatic char RCS[] =
  513. X    "$Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/str.c,v 1.6 91/03/13 15:57:16 rsalz Exp $";
  514. X#endif    /* RCSID */
  515. X
  516. X
  517. X/*
  518. X**  For Ozan Yigit's public domain regex.
  519. X*/
  520. X/* ARGSUSED */
  521. Xvoid
  522. Xre_fail(text, arg)
  523. X    char    *text;
  524. X    int        arg;
  525. X{
  526. X}
  527. X
  528. X
  529. X/*
  530. X**  Free up something that ReadFile made.  This doesn't belong here,
  531. X**  but news2mail doesn't need it, so we don't want it in misc.c.
  532. X*/
  533. Xvoid
  534. XFreeFile(V)
  535. X    char        **V;
  536. X{
  537. X    register char    **p;
  538. X
  539. X    if (p = V) {
  540. X    while (*p)
  541. X        free(*p++);
  542. X    free((char *)V);
  543. X    }
  544. X}
  545. END_OF_FILE
  546.   if test 612 -ne `wc -c <'str.c'`; then
  547.     echo shar: \"'str.c'\" unpacked with wrong size!
  548.   fi
  549.   # end of 'str.c'
  550. fi
  551. if test -f 'test-addr' -a "${1}" != "-c" ; then 
  552.   echo shar: Will not clobber existing file \"'test-addr'\"
  553. else
  554.   echo shar: Extracting \"'test-addr'\" \(540 characters\)
  555.   sed "s/^X//" >'test-addr' <<'END_OF_FILE'
  556. X##
  557. X##  Test re-write rules in hdr.c with -DTEST.
  558. X##  $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/test-addr,v 1.2 89/10/24 22:07:45 rsalz Exp $
  559. X##
  560. Xuucp-site!user
  561. Xsite.dom.com!user
  562. Xsite1.dom.com!user@site2.dom2.com
  563. Xuser@site.arpa
  564. Xuser%site.edu@relay.cs.net
  565. Xuser%site@relay.cs.net
  566. Xuusite1!uusite2!uucp-site!user
  567. Xuusite1!uusite2!uucp-site.edu!user
  568. Xuusite1!uucp-site.bogus!user
  569. Xuser@dec-site.uucp
  570. Xuser@site.oz
  571. Xseismo!site.oz!user
  572. Xuser%site.bitnet@bitgate
  573. Xuser%gate1%gate.edu@bitgate
  574. X@router:user@site.com
  575. Xuser%site1.edu%site2.com@gateway
  576. END_OF_FILE
  577.   if test 540 -ne `wc -c <'test-addr'`; then
  578.     echo shar: \"'test-addr'\" unpacked with wrong size!
  579.   fi
  580.   # end of 'test-addr'
  581. fi
  582. if test -f 'test-gag' -a "${1}" != "-c" ; then 
  583.   echo shar: Will not clobber existing file \"'test-gag'\"
  584. else
  585.   echo shar: Extracting \"'test-gag'\" \(2749 characters\)
  586.   sed "s/^X//" >'test-gag' <<'END_OF_FILE'
  587. X/*
  588. X**  Test suite for gag, Gateway Alias Generator.
  589. X**
  590. X**  $Header: /nfs/papaya/u2/rsalz/src/newsgate/src/RCS/test-gag,v 1.3 89/11/01 17:36:56 rsalz Exp $
  591. X*/
  592. X
  593. X
  594. X/*
  595. X**  BBN MAILING LISTS
  596. X*/
  597. X/* default inews flags = ""; */
  598. Xdefault distributions = "world usa na ne bbn ddn gnu inet";
  599. Xdefault directory = "/usr/lib/news/.admin";    /* Where MMDF scripts are */
  600. Xdefault mail2news = "/usr/uucp/bin/mail2news";    /* Paths to gateway    */
  601. Xdefault news2mail = "/usr/uucp/bin/news2mail";    /*   programs        */
  602. Xdefault mailcontact = "usenet";            /* Put in mail headers    */
  603. Xdefault mailhost = "mailer.bbn.com";        /* MMDF list processor    */
  604. Xdefault mailinglist = true;            /* Going both ways    */
  605. Xdefault organization = "BBN news/mail gateway";
  606. Xdefault owner = "usenet";            /* Sendmail alias owner    */
  607. Xdefault site = "gateway";            /* Psuedo news site    */
  608. Xdefault user = "news";                /* MMDF script owner    */
  609. X
  610. X/*    newsgroup        mailing list */
  611. Xgateway bbn.bboard        bboard;
  612. Xgateway bbn.test        usenet;
  613. X
  614. X/* Mail rec.equestrian articles to the list moderator, unless he's seen
  615. X * them already. */
  616. Xgateway rec.equestrian        horse
  617. X    news2mail =
  618. X        "v6mail -to kenr@ccp.bbn.com -subj 'Forwarded Horse Article'"
  619. X    site = "ccp.bbn.com";
  620. X
  621. X/* Set up post-comp-foo as an alias that posts articles. */
  622. Xmailpost comp.foo;
  623. X
  624. X
  625. X/*
  626. X**  GNU MAILING LISTS (OSU)
  627. X*/
  628. Xdefault site = "internet";            /* Psuedo news site    */
  629. Xdefault inews flags = "-x internet -d gnu";    /* Flags for mail2news    */
  630. Xdefault mail2news = "/usr/lib/news/nrecnews";    /* Path to mail2news    */
  631. Xdefault mailhost = "prep.ai.mit.edu";        /* Home of mailing list    */
  632. Xdefault mailinglist = true;            /* Going both ways    */
  633. Xdefault organization = dotify("GNUs Not Usenet");
  634. Xdefault owner = "usenet";            /* Sendmail alias owner    */
  635. X
  636. Xgateway gnu.announce            info-gnu
  637. X    moderator = "info-gnu@prep.ai.mit.edu"
  638. X    inews flags = "-d gnu";
  639. Xgateway gnu.emacs            info-gnu-emacs;
  640. Xgateway gnu.emacs.bug            bug-gnu-emacs;
  641. Xgateway gnu.gdb.bug            bug-gdb;
  642. Xgateway gnu.gcc                info-gcc;
  643. Xgateway gnu.gcc.bug            bug-gcc;
  644. Xgateway gnu.g++                info-g++;
  645. Xgateway gnu.g++.bug            bug-g++;
  646. Xgateway gnu.chess            info-chess;
  647. Xgateway gnu.ghostscript.bug        bug-ghostscript;
  648. Xgateway gnu.utils.bug            bug-gnu-utils;
  649. Xgateway gnu.emacs.gnus            info-gnus-english
  650. X    mailhost = "cis.ohio-state.edu";
  651. Xgateway gnu.emacs.vms        vms-gnu-emacs
  652. X    mailhost = "harvard.havard.edu";
  653. Xgateway gnu.emacs.lisp.manual        gnu-manual
  654. X    mailhost = "a.cs.uiuc.edu";
  655. X
  656. X
  657. X/*
  658. X**  OSU LOCAL MAILING LISTS
  659. X*/
  660. Xgateway alt.sca                sca
  661. X    inews flags = "-d alt -x internet"
  662. X    mailhost = "mc.lcs.mit.edu"
  663. X    mailinglist = false
  664. X    organization = dotify("Society for Creative Anachronism");
  665. X
  666. Xgateway cis.big-lan            big-lan
  667. X    inews flags = "-d cis -x internet"
  668. X    mailhost = "suvm.acs.syr.edu"
  669. X    organization = dotify("The Internet");
  670. END_OF_FILE
  671.   if test 2749 -ne `wc -c <'test-gag'`; then
  672.     echo shar: \"'test-gag'\" unpacked with wrong size!
  673.   fi
  674.   # end of 'test-gag'
  675. fi
  676. echo shar: End of archive 4 \(of 4\).
  677. cp /dev/null ark4isdone
  678. MISSING=""
  679. for I in 1 2 3 4 ; do
  680.     if test ! -f ark${I}isdone ; then
  681.     MISSING="${MISSING} ${I}"
  682.     fi
  683. done
  684. if test "${MISSING}" = "" ; then
  685.     echo You have unpacked all 4 archives.
  686.     rm -f ark[1-9]isdone
  687. else
  688.     echo You still must unpack the following archives:
  689.     echo "        " ${MISSING}
  690. fi
  691. exit 0
  692. exit 0 # Just in case...
  693.